Anfy Purchase Home

PROBLEMS SOLVING FAQ


System Requirements:

Java™ technology is supported by: Netscape versions 2 and higher, MS Explorer versions 3 and higher; HotJava™ and other browsers, on 32 bit operating systems (Windows 95/NT, Mac OS, Sparc, Linux, etc.). Java™ technology applets will not appear on Windows 3.1, or on a 16 bit browser (Netscape 4 for Win 3.1 supports Java™ technology but not as well as on Win 95). The Java™ technology support should be enabled in the browsers too, otherwise you will see a message stating your browser does not support Java™ technology.
The Anfy wizard requires Win 95/98/NT.


Differences between Java™ technology and Javascript™

Java™ is different from JavaScript™: Java™ is made by creating .class files and is more powerful than JavaScript™ (which is a script/batch language written directly inside a .html document).
The Anfy package contains only Java™ technology applets.


How to add Java™ technology applets to html documents:

1) Copy the .class files to the same directory as the .html files, along with any GIF and JPG images. In Anfy wizard this can be done with the "Copy all files to"function.

2) Add the <applet> tag in the html document. Some html editors do not allow this or have special standards. If this occurs, save the .html file first, then edit it with dos edit, notepad or other ASCII text editor. Then manually add the <applet> tag.
Anfy wizard helps you create the <applet> tag with the right parameters for your purposes and your images, but you still have to copy and paste the resulting <applet> tag in your html document. You can use the "Copy all files to" function to save a html document that contains only the applet, and then re-open it with your preferred html editor to add what you want.

3) Upload the .html file, .class files and any others (images etc.) to your web page directory as usual.
Please note that you have to upload the .class files using FTP in BINARY mode and not in ASCII mode !! Otherwise the applets will not work (a "java.lang.ClassFormat"or "java.lang.MethodVerification" or "Bad Magic Number" error message will be displayed).
Be sure file names and file length is not changed during the upload process: if files are of different size, or have a different name ( example: the file ends with .cla instead of .class) then something went wrong.



Most common errors:

A) LONG FILENAMES TRUNCATION AND LETTER CASE CHANGE: Many MS-DOS users are still using PKUNZIP to decompress zip archives or 16 bit programs to copy and upload files, and do not take into consideration the difference between FiLe.ExE, FILE.EXE and fILe.eXe. This is not good for various reasons:

The first one is the use of long file names: msdos (and old 16 bit win 3.1 programs) are only able to support file names with 8+3 characters.
Newer systems on the other hand support long file names, for example MyNiceApplet.class, which has a suffix of 5 chars. If you use PKUNZIP to unzip the applet archives, or upload the .class files on the server with an old Windows 3.1 FTP program or similar, you will TRUNCATE the filename, and the result will be MYNICEAP.CLA !
Trying to run the applet will result in a "java.lang.ClassNotFound"error displayed. Ensure you unzip using "winzip 32" or similar in win95, and to copy/upload the files with these newer programs that do not truncate the filenames.

Consider the case of the characters, as well, since many servers on the Internet (Unix) are case sensitive.
For example, if the applet is named "MyNiceApplet.class" and you write "Myniceapplet.class", the applet will not work. The most common mistakes are in mismatched image filenames, because win95 is not case sensitive and it loads an image even if the case is different.
For example, if you save an image as "image1.jpg" you will also be able to load it from your local harddrive if you refer to it as IMAGE1.JPG, image1.JPG or IMAGE1.jpg. But once you put it on your ISP's server it will only work if you refer to it as image1.jpg.
Ensure the names of images you load from an applet are identical in case and characters.

B) Wrong image or applet size: read the instructions for the applet carefully because images usually MUST be of fixed sizes (for example 64*64, 128*128 etc.). Do not enlarge the applets too much, and images more than a width of 600 pixels. They will not be fully visible to those using a video mode of 640*480 pixels.
In most cases, Anfy wizard can detect an incorrect image or applet size, and this will help prevent one of the most common errors.


Less common errors:

A) "Using Netscape Gold 3, the applets work offline but fail to work online, displaying a java.lang.NullPointerException error."

This is a bug in the browser that randomly appears. If this occurs, try reloading, clearing the cache, or in rare cases deleting the cache files manually from netscape cache directory. Similar "NullPointer" error messages happen occasionally on Netscape 4.04.
However, visitors will have no problems seeing the applet.


B) "I updated all the class files on my GEOCITIES site, and when I reloaded the page I received an error message (java.lang.NoClassDefFoundException) in applets".

This is a temporary problem generated by Geocities and some other sites. If you reload the page after a couple of minutes, the applets will run correctly.
In other circumstances, this error means you forgot to upload some .class files (for example anfy.class).


C) "Using Netscape 3, I received an error message (java.awt.image.Memory ImageSource: method newPixels(), or java.lang.NoSuchMethodError: java.awt.image. Memory ImageSource) about the applets".

This is a problem related to anfy.class. You are probably using an old or incorrect anfy.class file, or you have an old one in the cache.
Check and see that you are using the same anfy.class that came with the applets, and clear the cache.


D) "I am using the AOL browser, and everything else on page would appear but the applet. Instead there was a message -Loading image-, and the image never appeared, just a gray rectangle".

In this case, you have to turn off graphics compression in the AOL internet browser preferences as follows:
On the AOL Toolbar, click Members, Click Preferences, Click WWW Icon (Picture of world globe), and you will see a dialog box. Click the "Web Graphics" tab, and a page appears with the question "Do you want Web Graphics to be compressed. This will display pages faster". Under the question is a box that you "check" if you want compression, otherwise leave it blank. If it is checked, clear it.


E) "I am using a transparent gif image in one applet (lens, water, lake, etc.) as main image, and I see gray background instead of transparency".

This is because a transparent background is not supported in Java™ technology. You can use transparent images ony as overlay images.


F) Strangely, sometimes the GIF overlay images are not totally draw by Netscape, but are draw completely when one uses Explorer.

In most cases, you just have to re-save the GIF image in interlaced mode if it was in normal mode, or vice-versa, then it will be displayed correctly.
This problem occurs more frequently on larger images.


G) "I removed the <param name="credits" parameter, and the applet is not running any more, even if it is registered".

With registration, you purchase a regcode that enables link parameters and removes the credits window that pops up when the applet is clicked. This does not include the "credits" parameter. It is only a signature of the applet, not visible by the visitors (except those who look at the page source code). This is why it is not modified by your registration. Why would you want to remove it? If you read the instructions carefully, then you should note that it should not be removed.



Tips & Tricks:

1) You may be thinking, "What will people without Java™ technology browsers see instead of the applet ?" You can specify an alternate text, image, or a whole html segment to be used instead of the applet:

<applet code="MyApplet.class" width=150 height=150>
<param name=param1 value="1234">
<param name=param2 value="5678">
<IMG ALT="*" ALIGN=center SRC="alternateimage.gif" border=0>
</applet>

You can even load images for applets from a cgi-bin/ dir, maybe a 'pic of the day' cgi or similar.

<applet code="MyApplet.class" width=150 height=150>
<param name=image value="/cgi-bin/Image.cgi">
<param name=param2 value="5678">
<IMG ALT="*"ALIGN=center SRC="/cgi-bin/Image.cgi" border=0>
</applet>

So, you can display a normal image if Java™ technology is not present, rather than Java™ technology manipulations of the image if Java™ technology is present. In the Anfy wizard, you can enter this alternate text or html in the "For no Java™ technology browser" field.



2) If you want to read .class files from another dir or path, just use the codebase tag.

<applet codebase="http://www.app.com/app/" code="MyApplet.class"width=150 height=150>
<param name=param1 value="1234">
<param name=param2 value="5678">
Sorry, your browser doesn't support Java™ technology.
</applet>



3) When you try to use a mask for the applet, there is a thin (about 1-2 pixel) border at the top of the applet before the round image.

To remove it, use the HSPACE="0" and VSPACE="0" tags, within the <applet> tag:

<applet code="MyApplet.class"hspace=0 vspace=0 width=150 height=150>


Frontpage users:

Here is an example of the configuration steps for the Anfy Water applet:

1) If you don't already have an image, use Image Composer ( FrontPage's Tool ) to create and save an image as "water.gif" for example, in a new empty folder.

2) In the Anfy wizard main screen, select WATER, press the NEXT button, then press "browse" button and choose your image for the effect. Then press the NEXT button 4 times, and use the publish function "Copy all files to" to save all the needed files in the new folder.

3) Open FrontPage. In FrontPage Explorer, import the Applets, including anwater.html, anfy.class, AnWater.class , Lware.class, and waterscr.txt. In other words, these files must be present in same folder (directory) as the html document you will edit.

4) In FrontPage's Editor, open anwater.html, then select the applet and click copy button on the toolbar.

5) Open a new web page, or the document where you want to insert the applet, and click the paste button on the toolbar.

A faster way would be:

4) Open FRONTPAGE.
5) Open the web page you want.
6) Drag the file to the open web
7) Click on the web page within the editor. It will open with the applet in place, and you can go about editing. Click on the JBAR in the applet to adjust the settings.

This should configure the applet to work. If you want to change parameters, double click the applet, and you can open "Java™ technology Applet Properties" box.
You may have directory problems on the server, because FrontPage requires a web server and forces you to import the .class libraries onto the web.
If you copy them into the web directories, then you have to put them in the right place and select "Recalculate Hyperlinks" in the explorer. Then you have to make sure the applets parameter point to the applet properly.

Note: In order to change the scrolltext, you have to modify the waterscr.txt content



Bug reports:

- Don't save .JPG images from Adobe PhotoShop 4 with "thumbnail" option enabled, because some Java™ technology implementations (Netscape 3) will not be able to read them. Disable thumbnail feature or use PhotoShop 3.

- MS Explorer 3.02 (and some beta 4.0 versions) have a bug that causes an exception: com.ms.applet.Security.Couldn`t connect when Java™ technology loads images from the local Hard Disk.
Applets will work when you are online, but will be hard to test offline, so get a newer or older version (3.01 or 4.0 final for example).
The URL for Java™ technology explorer upgrade is http://www.microsoft.com/java/vm/vmdownload.htm.


Compatibility parameters:

PREFACE: Many people think Java™ technology is dangerous, not secure, and crashes a lot of browsers. This is true for poorly programmed applets and pages overloaded with 10 applets, and on old computers.
If you use Anfy applets with "Optimize for compatibility" settings, placing NO MORE than one applet each html page, no browsers will have the opportunity to crash.


What do I do if the Java™ technology APPLET(s) uses 100% of my CPU power, slows down the browser, or steals all my available memory ?

A) When the applet is running, Netscape or Explorer may slow down, and sometimes the Operating System (Win95, WinNT, MacOS etc.) hangs or slows down as well.

If this happens you have to increase the MinSYNC parameter until the system operates normally. This value is usually set to 10, but you can set it to 20,40,60,100 or even more to lower the applet speed and thus leaving CPU power to the browser and OS. You can also decrease the "priority"parameter.

B) When the applet has been running for a short period of time memory runs out and the hard disk starts spinning (the OS is using it's swap file to simulate more memory).

If this happens, you are most likely using a version of Netscape 3 / MS Explorer 3 w/bugs. This problem is not present in the fixed rel. 3 and rel. 4, but you can fix the problem by decreasing memdelay to 10 - 16:

Anfy wizard provides 3 predefined settings in the expert mode panel: Standard settings will set MinSYNC to 10 and priority to 3, and this is acceptable for 99% of browsers.

If you want to ensure the applet will run even in buggy versions of Explorer and Netscape and you don't care if the applets run much slower, select the Optimize for compatibility option. This will set MinSYNC to 30, priority to 1 and memdelay to 15.

If you want to pump the applets to the max, and don't care if this will hit older browsers and slow their CPU dramatically, select Optimize for speed. This places a MinSYNC value of 2 and a task priority of 6.

It is possible to manually set MinSYNC to 0 and priority to 10, for those who want to test the applet in full speed on a P200MMX or Pentium II.

Remember, the most important guideline:

DON'T INSERT MORE THAN ONE APPLET ON EACH PAGE

If you really MUST place more than one applet per page (do so at your own risk!), be sure to set the priority parameter to 5 on all applets. If you want one to run faster than another, change their priority to match your desired speeds.


You have another problem?

If you are a registered Anfy user (in other words, if you purchased at least one regcode) and you are experiencing a technical problem not described in this document, you may freely ask for help to Anfy Contact Persons.

Note: The free support (in English only) is guaranteed only to registered users, and please be sure to read the PROBLEMS SOLVING FAQ carefully. Most common problems have already been answered.


Anfy · Purchase · Home
Copyright © 1997,98,99 Fabio Ciucci. Java™ and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
Fabio Ciucci is independent of Sun Microsystems, Inc.